﻿using System.Collections.Generic;
using ZilLion.Service.WeChatMall.Domain.CrmProxy;
using ZilLion.Service.WeChatMall.Domain.Entitys.Orders;
using ZilLion.Service.WeChatMall.Domain.Repositorys.Interface.CrmProxy;
using ZilLion.Service.WeChatMall.Domain.Responses.CrmProxy;

namespace ZilLion.Service.WeChatMall.Domain.Services.Interface
{
    public interface IOrderService
    {
        /// <summary>
        ///     保存订单信息(未支付)
        /// </summary>
        /// <param name="dto"></param>
        OrderCompletedInfoDto SavePrePayOrder(OrderCompletedInfoDto dto);

        /// <summary>
        ///     剪切未支付订单信息到正式订单表
        /// </summary>
        /// <param name="payResult"></param>
        /// <param name="orderInfo"></param>
        /// <param name="accinfo"></param>
        /// <param name="passport"></param>
        /// <param name="passporttype"></param>
        /// <param name="crmHost"></param>
        OrderCompletedInfoDto CashPay(AccCashPayResponse payResult, OrderCompletedInfoDto orderInfo,
            AccInfo accinfo, string passport,
            PassportType passporttype,string crmHost);

        /// <summary>
        ///     获取未付款订单
        /// </summary>
        /// <param name="custid"></param>
        /// <returns></returns>
        IList<OrderCompletedInfoDto> GetPrePayOrders(long custid);

        /// <summary>
        ///     获取未付订单摘要
        /// </summary>
        /// <param name="custid"></param>
        /// <returns></returns>
        IList<OrderAbstractDto> GetPrePayOrdersAbstract(long custid);

        /// <summary>
        ///     分页获取已付款订单数据
        /// </summary>
        /// <param name="custid"></param>
        /// <param name="minsno"></param>
        /// <param name="pageCount"></param>
        /// <returns></returns>
        IList<OrderAbstractDto> GetOrdersAbstract(long custid, int pageCount = 15, string minsno = "");

        /// <summary>
        ///     根据Sno 获取未付订单信息
        /// </summary>
        /// <param name="sno"></param>
        /// <returns></returns>
        OrderCompletedInfoDto GetPrePayOrderBySno(string sno);

        /// <summary>
        ///     根据Sno 获取已付订单信息
        /// </summary>
        /// <param name="sno"></param>
        /// <returns></returns>
        OrderCompletedInfoDto GetPiedOrderBySno(string sno);

        /// <summary>
        ///     取消订单
        /// </summary>
        /// <param name="sno"></param>
        void CancelOrderBySno(string sno);
    }
}